/**
 * 
 */
package cas.server.ldap.authe.compare;

import org.apache.directory.api.ldap.model.password.PasswordUtil;
import org.apache.directory.api.util.Strings;

/**
 * @author Cre.Gu
 *
 */
public class SimpleStringCredentialCompare implements StringCredentialCompare {

	@Override
	public boolean compare(String credential, byte[] stored) {
		return PasswordUtil.compareCredentials(Strings.getBytesUtf8(credential), stored);
	}

}
